This week, I tackle the concept of recursion as it relates to computer science.

Episode 2 - Recursion

JavaScript example of the factorial function:


// Accepts x as an argument
function factorial(x) {
    if(x == 1) // This is the base case for if x is 1, do not recurse
      return 1;
    else
      return x*factorial(x-1); // the argument changes and the function called
}


Posted by Ellyoda Tue, 09 Mar 2010 04:15:05 (comments: 5)
 
Tue, 09 Mar 2010 07:08:35

Cool, I'll DL in the morning.

As a fun exercise google "recursion".  It will ask you if you meant, "recursion".  If you click on it, it will ask you if you meant, "recursion".

 
Tue, 09 Mar 2010 20:36:48
When I right-click on the link it saves it as htm (though when I mouse over it says mp3). In opera I usually right-click and Save To DL Folder, but in this case when I do that it saves it as an htm.
 
Tue, 09 Mar 2010 20:58:09
Ack, uploaded to the wrong folder.  All better now.
 
Wed, 10 Mar 2010 19:53:09

I've never had a problem with understanding recursion.  What I'd be interested in (and I'll look this up) is to see who is attributed with assigning a name to the concept etc...

Again, just as you get started they finish, which must mean they are the right length.  Also, I understand they have to be short with no other host etc... It's gotta be tougher to talk for 20-30 minutes by yourself without any stimulus.

 
Wed, 10 Mar 2010 22:54:43
My first exposure to recursion years ago I found it a bit difficult to think in those terms, and as I mentioned, the way I found best to get my head in the right mode was just to rewrite a basic for-loop recursively.

Believe me on this one, I was finished.  I had multiple edit points, and separately recorded sections, as opposed to the first two which were basically just straight through one recording start to finish (so I'm glad if it came out alright).  On the time, I wavered between 20 minutes or 30 minutes initially, but went with 20 since I felt I could cover any topic that I'd think worthwhile in that time, while some would need to stretch to fill 30.  Like recursion, which was difficult to do 20 LOL

And a catalyst for starting these was that despite feeling comfortable on the podcast, I found if I tried to record anything on my own I'd still feel awkward.  Figured this would help things along.
Log in or Register for free to comment
Recently Spotted:
travo (9m)
Login @ The VG Press
Username:
Password:
Remember me?